package day1112;

import java.util.Scanner;

public class V8 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println(
                "请输入一个大于0小于等于" +
                        "24的int数值，表示小时:");
        int  hour=sc.nextInt();
        if( 0>=hour || hour>24 ){
            System.out.println("您输入数值超范围了");
            return; //结束main方法
        }

        if(hour>=13){
            System.out.println(hour-12  +"pm");
        }else{
            System.out.println(hour + "am");
        }


    }
}
